$('#btn').on('click',function () {
    var ss = new Object();
    ss.coursedir = document.getElementById("ucourse").value;
    $.ajax(
        {
            type:'POST',
            contentType: "application/json; charset=utf-8",
            url:contextPath+"learner/dir",
            data:JSON.stringify(ss),
            dataType:'json',
            success:function (data) {
                console.log(data.message);
                alert(data.message);
            },
            error:function () {
                alert("修改失败");
            }
        })
});